{include file="public/header"}
<style type='text/css'>
.xi_section1 .center1 .pp1 .a1{float:none;}
</style>
    <script type="text/javascript">
    function countDown(obj,endTime){
        var time_start = new Date().getTime(); //设定当前时间
        var time_end =  parseInt(endTime); //设定目标时间
        // 计算时间差
        var time_distance = time_end - time_start;
        // 天
        var int_day = Math.floor(time_distance/86400000);
        time_distance -= int_day * 86400000;
        // 时
        var int_hour = Math.floor(time_distance/3600000);
        time_distance -= int_hour * 3600000;
        // 分
        var int_minute = Math.floor(time_distance/60000);
        time_distance -= int_minute * 60000;
        // 秒
        var int_second = Math.floor(time_distance/1000);
        // 时分秒为单数时、前面加零
        if(int_day < 10 && int_day > 0){
            int_day = "0" + int_day;
        }else if(int_day < 0){  // 日期已过
            console.log(obj);
            $(obj).text("已到期");//加载数据后，发现已经过期了，没有倒计时的必要
            return false;
        }
        if(int_hour < 10){
            int_hour = "0" + int_hour;
        }
        if(int_minute < 10){
            int_minute = "0" + int_minute;
        }
        if(int_second < 10){
            int_second = "0" + int_second;
        }
        if(int_day<=0 && int_hour<=0 && int_minute <=0 && int_second<=0){
            console.log(obj);
            $(obj).text("已到期");//加载数据后，发现已经过期了，没有倒计时的必要
            return false;
        }
        // 显示时间
        if(int_day>0){
            var result = parseInt(int_day)+"天"+int_hour+"小时"+int_minute+"分"+int_second+'秒';
		}else{
            var result = int_hour+"小时"+int_minute+"分"+int_second+'秒';
		}
        $(obj).text(result);
        // 设置定时器
        setTimeout("countDown("+"'"+obj+"'"+","+endTime+")",1000);
    }
    </script>
<body class="">
<div class="bg_fixed"></div>
	<div class="sectionY">
		<a href="{:url('Rent/index')}">
			<img src="__PUBLIC__/home/images/a2_1.png" alt="" class="a1">
		</a>
		<p class="p1">抢购详情</p>
	</div>
	<div class="kong1"></div>
	<div class="xi_section1">
		<div class="title">
			<p class="p1">订单基本信息</p>
		</div>
		<div class="center">
			<ul>
				<li class="clearfix">
					<span class="s1">类型</span>
					<span class="s2">{$buyid.title}</span>
				</li>
				<li class="clearfix">
					<span class="s1">应付费用</span>
					<span class="s2">{$buyid.price}</span>
				</li>
				<li class="clearfix">
					<span class="s1">合约收益</span>
					<span class="s2">{$buyid.daynum}天/{$buyid.earnpercent}%</span>
				</li>

				<li class="clearfix">
					<span class="s1">消耗共享豆</span>
					<span class="s2"><span class="s3">{$buyid.caifen}</span>个</span>
				</li>
				<li class="clearfix">
					<span class="s1">预计获得收益</span>
					<span class="s2">{$buyid.dayaddprice}</span>
				</li>
				<li class="clearfix">
					<span class="s1">支付状态</span>
                    {if condition="$payid['paystatus'] eq 0"}<span class="s2">未付款</span>{/if}
                    {if condition="$payid['paystatus'] eq 1"}<span class="s2">已付款</span>{/if}
                    {if condition="$payid['paystatus'] eq 2"}<span class="s2">已完成</span>{/if}
				</li>
				<li class="clearfix">
					<span class="s1">抢购时间</span>
					<span class="s2">{$buyid.ctime|date='Y-m-d H:i:s',###}</span>
				</li>

                {if condition="$payid['paystatus'] eq 0"}
                    <li class="clearfix">
    					<span class="s1">付款剩余时间：</span>
                        <span style='color:red;' class="s2 sred" id='oneTime{$payid.id}'></span>
                        <?php $recive_time = ($payid['peiduitime']+config('setting.pay_limit_time')*60); ?>
                        <script>countDown('#oneTime'+{$payid.id},parseInt({$recive_time}*1000));</script>
    				</li>
                {/if}
                {if condition="$payid['paystatus'] eq 1"}
                    <li class="clearfix">
    					<span class="s1">确认收款剩余时间：</span>
                        <span style='color:red;' class="s2 sred" id='oneTime{$payid.id}'></span>
                        <?php $recive_time = ($payid['paytime']+config('setting.sure_limit_time')*60); ?>
                        <script>countDown('#oneTime'+{$payid.id},parseInt({$recive_time}*1000));</script>
    				</li>
                {/if}

				<li class="clearfix">
					<span class="s1">到期时间</span>
					<span class="s2">{$buyid.cansaletime|date='Y-m-d H:i:s',###}</span>
				</li>
			</ul>
		</div>
		<div class="title">
			<p class="p1">转让方收款帐号信息</p>
		</div>
		<div class="center1">
            <!--新增联系双方信息-->
            <div class="pp1 clearfix" style="margin:0;">
                <div class="a1">
                    <p class="p1">
                        <span class="s1">用户名：</span>
                        <span class="s2">{$get_man.username|default=''}</span>
                    </p>
                    <p class="p1">
                        <span class="s1">手机号：</span>
                        <span class="s2">{$get_man.selfphone|default=''}</span>
                    </p>
					<p class="p1">
						<span class="s1">紧急联系人：</span>
						<span class="s2">{$get_man.mustman|default=''}</span>
					</p>
                </div>
            </div>
            <?php
            $str = '';
            if(empty($get_man['emailname']) || empty($get_man['email']) || empty($get_man['emailcode'])){}else{
                $str = $str."<option value='支付宝'>支付宝</option>";
            ?>
                <div class="pp1 clearfix">
                    <div class="a1">
                        <p class="p1">
                            <span class="s1">账号类型：</span>
                            <span class="s2">支付宝</span>
                        </p>
                        <p class="p1">
                            <span class="s1">用户姓名：</span>
                            <span class="s2">{$get_man.emailname}</span>
                        </p>
                        <p class="p1">
                            <span class="s1">支付宝账号：</span>
                            <span class="s2">{$get_man.email}</span>
                        </p>
                    </div>
                    <div class="a2">
                      {if config("setting.paycode")==2}
                        <img src="{:config('setting.alipaytpic')}" alt="1" class="show_btn">
                      {else}
                        <img src="{$get_man.emailcode}" alt="1" class="show_btn">
                      {/if}
                    </div>
                </div>
            <?php
        }if(empty($get_man['realname']) || empty($get_man['banktypename']) || empty($get_man['bankname']) || empty($get_man['bankcard']) ){}else{
            $str = $str."<option value='银行卡'>银行卡</option>";
            ?>

            <div class="pp1 clearfix">
                    <div class="a1">
                        <p class="p1">
                            <span class="s1">账号类型：</span>
                            <span class="s2">银行卡信息</span>
                        </p>
                        <p class="p1">
                            <span class="s1">用户姓名：</span>
                            <span class="s2">{$get_man.realname}</span>
                        </p>
                        <p class="p1">
                            <span class="s1">开户银行：</span>
                            <span class="s2">{$get_man.banktypename}</span>
                        </p>
                        <p class="p1">
                            <span class="s1">开户支行：</span>
                            <span class="s2">{$get_man.bankname}</span>
                        </p>
                        <p class="p1">
                            <span class="s1">银行卡号：</span>
                            <span class="s2">{$get_man.bankcard}</span>
                        </p>
                    </div>
                </div>

            <?php
            }
            if(empty($get_man['selfqqname']) || empty($get_man['selfqq']) || empty($get_man['selfqqcode'])){}else{
                $str = $str."<option value='微信'>微信</option>";
            ?>
                <div class="pp1 clearfix">
                        <div class="a1">
                            <p class="p1">
                                <span class="s1">账号类型：</span>
                                <span class="s2">微信</span>
                            </p>
                            <p class="p1">
                                <span class="s1">用户姓名：</span>
                                <span class="s2">{$get_man.selfqqname}</span>
                            </p>
                            <p class="p1">
                                <span class="s1">微信号：</span>
                                <span class="s2">{$get_man.selfqq}</span>
                            </p>
                        </div>
                        <div class="a2">
                          {if config("setting.paycode")==2}
                            <img src="{:config('setting.wechatpic')}" alt="1" class="show_btn">
                          {else}
                            <img src="{$get_man.selfqqcode}" alt="1" class="show_btn">
                          {/if}
                        </div>
                    </div>
            <?php
            }
            ?>
            </div>

        {if condition="$payid['paystatus'] gt 0"}
    		<div class="title">
    			<p class="p1">我的付款凭证</p>
    		</div>
    		<div class="center1" >
                <div class="pp1 clearfix">
                        <div class="a1">
                            <p class="p1">
                                <span class="s1">付款方式：</span>
                                <span class="s2">{$payid.paytype}</span>
                            </p>
                            <p class="p1">
                                <span class="s1">上传付款时间：</span>
                                <span class="s2">{$payid.paytime|date='Y-m-d H:i:s',###}</span>
                            </p>
                        </div>
                        <div class="a2">
                            <img src="{$payid.payimg}" alt="2" class="show_btn">
                        </div>
                    </div>
    		</div>
        {/if}
	</div>
	<div class="zhan" style="height: 60px;"></div>
	<div class="footer_fix">
		<a href="{:url('Rent/index')}">返回列表</a>
	</div>
	<div class="big_img">
		<img src="__PUBLIC__/home/images/a5.jpg" alt="">
	</div>

	<!-- <div class="w_section5">
		<div class="container2">
			<p class="p1">暂无数据</p>
		</div>
	</div> -->









</body>
<script>
	$(function(){
		$(".pic_btn").click(function(){
			$(this).siblings("input").click();
		})
	})
</script>

<script>
	$(function(){
		var d = $(window).height()-46-44;
		$(".zu_section2").css("height",d);
		$(".show_btn").click(function(){
            var altval = $(this).attr('src');
            $(".big_img img").attr('src',altval);
            var dd = $(".big_img").height();
            $(".big_img").show(200);
            $(".big_img img").css("paddingTop",(dd-$(".big_img img").height())/3.5);
		})
		$(".big_img").click(function(){
			$(".big_img").hide(200);
		})

	})
</script>
</html>
